A typical digital camera includes an array of photosensors, with each photosensor sensitive to only a single color of light. For example, each photosensor is sensitive to one of red, green and blue light. During image acquisition, an image is focused on the photosensor array, and each photosensor measures or “samples” a single color of the image. If red-sensitive, green-sensitive and blue-sensitive photosensors can be located at each pixel, the photosensor array can acquire an image having “full color” at each pixel.
The photosensor arrays of certain digital cameras have only a single photosensor at each pixel location. These cameras produce digital images that do not have full color information at each pixel. Since each photosensor is sensitive to only a single color, the photosensor array produces a digital image having only a single color sample at each pixel. For example, a digital camera produces a digital image having one of red, green and blue sampled information at each pixel. Information about the other two colors at each pixel is missing. This undersampled digital image is referred to as a “mosaic” image.
A demosaicing algorithm may be used to transform an undersampled digital image into a digital image having full color information at each pixel value. A typical demosaicing algorithm interpolates the missing pixel information from the sampled pixel values in the mosaic image.
Edges and other abrupt photometric transitions present a particular problem to demosaicing. A simple demosaicing algorithm such as bilinear interpolation fills in a missing pixel value by taking an average of sampled values from neighboring pixels. However, some of those neighbors might lie on opposite sides of an edge. Some of the neighbors lying on one side of the edge might belong to one object, while the other neighbors lying on the other side might belong to a different object. Consequently, the interpolated pixel information might not describe either object. Since traditional bilinear interpolation does not account for edges, color information at edges in the demosaiced image can be distorted.
More complex demosaicing algorithms try to account for edges. Still, even the more complex demosaicing algorithm can introduce artifacts into the demosaiced image. Zippering and fringing are typical artifacts at edges in the demosaiced image. These artifacts can degrade image quality.
A typical digital camera can perform the demosaicing. This capability allows a typical digital camera to display and upload images having full color at each pixel. However, memory and processing power of a typical digital camera are limited. The limited memory and processing power can constrain the complexity of the demosaicing algorithm and hamper the ability to account for edges and reduce artifacts at the edges during demosaicing.
A demosaicing algorithm that is simple and fast, and that reduces edge blurring and the visibility of certain artifacts at edges, is desirable. Such a demosaicing algorithm is especially desirable for digital cameras.